home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myHilite, menuCast, buttonCast, myField, myList, mySelection, myFunction
-
- on birth me, spriteNum1, spriteNum2, castNum1, castNum2, fieldName, listString, handler
- set mySprite to spriteNum1
- set myHilite to spriteNum2
- set menuCast to castNum1
- set buttonCast to castNum2
- set myField to fieldName
- set myList to listString
- set mySelection to line 1 of myList
- set myFunction to handler
- puppetSprite(mySprite, 1)
- puppetSprite(myHilite, 1)
- set the textHeight of field myField to 18
- put mySelection into field myField
- return me
- end
-
- on menuSelect me
- set the castNum of sprite mySprite to menuCast
- updateStage()
- put myList into field myField
- set oldSelection to mySelection
- set doOnce to 1
- repeat while the stillDown or doOnce
- set doOnce to 0
- if rollOver(mySprite) then
- set lineNum to the mouseLine
- if lineNum > 0 then
- set loc to the locV of sprite mySprite - 18
- set the locV of sprite myHilite to loc + (lineNum * 18)
- set the visible of sprite myHilite to 1
- set mySelection to line lineNum of field myField
- end if
- else
- set the visible of sprite myHilite to 0
- set mySelection to oldSelection
- end if
- updateStage()
- end repeat
- set the castNum of sprite mySprite to buttonCast
- set the locV of sprite myHilite to the locV of sprite mySprite
- set the visible of sprite myHilite to 1
- put mySelection into field myField
- updateStage()
- if stringp(myFunction) then
- do(myFunction)
- end if
- end
-
- on controlSelection me, selection
- set mySelection to line selection of myList
- put mySelection into field myField
- end
-